package com.violet.myorm.core.sql;

import java.util.List;

public class UpdateSql extends Sql {

    public UpdateSql(String tableName, List<String> setFields, List<String> where) {
        if (where == null || where.isEmpty()) throw new RuntimeException("修改数据必须要有 where");

        sql.append("UPDATE ").append(tableName).append(" SET ");
        super.setUpdateFields(setFields);
        super.setWhere(where);
    }

}
